﻿using System;
using System.Collections.Generic;
using System.IdentityModel.Services;
using System.Linq;
using System.Security.Claims;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.AspNet.Membership.OpenAuth;

namespace xSolon.STS
{
    public partial class _Default : Page
    {
protected void Page_Load(object sender, EventArgs e)
{
    if (Page.User.Identity.IsAuthenticated)
    {
        FederatedPassiveSecurityTokenServiceOperations.ProcessRequest(Request, User as ClaimsPrincipal, CustomSecurityTokenServiceConfiguration.Current.CreateSecurityTokenService(), Response);
    }
    else
    {
        var provider = OpenAuth.GetProviderNameFromCurrentRequest();
        FormsAuthentication.RedirectToLoginPage();
    }
}
    }
}